<template>
	<view class="service">
		<view class="ser-con">
			<view class="ser-cons">
				<view class="icon" @click="close"></view>
				<view class="title">Customer Services:</view>
				<view class="link" @click="call">{{phone}} <image src="../static/tel.png" /></view>
				<view class="title">Our E-mail address:</view>
				<view class="link">cs@cashmum.ph</view>
				<view class="title">Complaint Mailbox:</view>
				<view class="link">complaint@cashmum.ph</view>
				<view class="title">Facebook:</view>
				<view class="link" @click='toLink'>https://www.facebook.com/CashMumPh/</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				showDiv: true,
				phone:""
			}
		},
		
		mounted: function() {
			this.phone = uni.getStorageSync('serPhone') || "09173230828";
		},
		
		methods: {
			call(){
				uni.makePhoneCall({
					phoneNumber: this.phone
				});
			},
			toLink(){
				const url = 'https://www.facebook.com/CashMumPh/'
				//#ifdef H5
					window.open(url,"_blank")
				//#endif
				
				//#ifdef APP-PLUS
				    plus.runtime.openWeb(url);
				    // plus.webview.open(url)
				//#endif
			},
			close(){
				this.$emit("close")
			}
		}
	}
</script>

<style scoped lang="scss">
	.ser-con {
		width: 100%;
		height: 100%;
		background: rgba(0, 0, 0, 0.3);
		position: fixed;
		top: 0;
		left: 0;
		display: flex;
		justify-content: center;
		align-items: center;
		.ser-cons {
			position: relative;
			width: 650rpx;
			padding: 60rpx 0;
			background-color: #FFF;
			border-radius: 10rpx;
			.icon {
				width: 50rpx;
				height: 50rpx;
				background: url("../static/close.png") no-repeat center;
				background-size: 28rpx 27rpx;
				position: absolute;
				top: 25rpx;
				right: 25rpx;
			}
			.title{
				height: 88rpx;
				line-height: 88rpx;
				font-size: 30rpx;
				font-weight: normal;
				color: #333;
				margin-left: 100px;
			}
			
			.link {
				display: flex;
				align-items: center;
				justify-content: space-between;
				width: 522rpx;
				height: 86rpx;
				line-height: 86rpx;
				padding: 0 30rpx;
				font-size: 30rpx;
				color: #FFF;
				background-color: #4c2db8;
				border-radius: 2rpx;
				margin: 0 auto;
			}
		}
		image {
			width: 52rpx;
			height: 52rpx;
		}
	}
</style>
